home *** CD-ROM | disk | FTP | other *** search
- Subject: Re: REPOST: Parts with fixed display size
- Sent: 9/4/96 10:57 AM
- Received: 9/4/96 10:57 AM
- From: motion@nbn.com (Arni McKinley)
- Reply-To: ODF-Interest@CILabs.ORG
- To: OpenDoc Development Framework Discussion List
-
-
- Hi Oliver,
-
- I posted a reply to you on this Aug 27. Here it is again.
-
- Containers are supposed to look for a property called
- kODPropSuggestedFrameShape when firsat embedding a part. ODFDraw does this,
- so does Page Composer. I assume most containers are doing that now. So you
- need to write to this property when you first externalize. I put it in our
- part content's Externalize(0 method first thing. Something like this:
-
- // Write out a suggested size for frame opening
- ODShape* propFrameShape = new ODShape;
- propFrameShape->Acquire(ev);
- propFrameShape->SetRectangle( ev, &kProposedFrameRect );
-
- ::ODSUForceFocus( ev, storageUnit, kODPropSuggestedFrameShape,
- kODPolygon );
- propFrameShape->WriteShape( ev, storageUnit );
-
- ::ODSUForceFocus( ev, storageUnit, kODPropFrameShape, kODPolygon );
- propFrameShape->WriteShape( ev, storageUnit );
-
- propFrameShape->Release(ev);
-
- You may come up with a slicker way of doing it, but there it is. The
- container will read this property then give the frame this suggested size.
-
- After that you manage the frame's shape trhough the regular arbitration
- calls to keep the frame the size you want it.
-
- Arni
-
-
- >I am reposting this, because nobody has answered yet and since that has
- >never happened before on this list I suspect that it has been lost during
- >the list-outage...
- >
- >-----------------------------------------------------
- >
- >
- >Hi there,
- >
- >I hope I can explain this correctly:
- >
- >We are trying to create a part that has a self determined fixed frame size.
- >
- >We want the part to enforce its visible area when the user embeds it into
- >another part. When you drag the www browser part of Cyberdog into ODF Draw
- >it first has a small frame which it expands once it begins to download the
- >data.
- >
- >We want our part to determine its correct display size and then set it
- >itself. After that it should prohibit the user from resizing it. The user
- >should only be allowed to drag the part around.
- >
- >How can this be done? Any help is greatly appreciated.
- >
- >TIA,
- >
- >Oliver.
-
- Arni F. McKinley
- President
- MetaMind Software, Inc.
- Mill Valley, CA 94941
- motion@nbn.com
- www.nbn.com/people/minds
- _______________________________________